{% extends 'empcms/super.html'%}
{% block temp_tit %}
     <title>updateEmp</title>
{% endblock %}
{% block  empcms%}
    <div id="content">
        <p id="whereami">
        </p>
        <h1>
            update Emp info:
        </h1>
        <form action="/empapp/emp/update/" method="post">
            {% csrf_token%}
            <table cellpadding="0" cellspacing="0" border="0"
                class="form_table">
                <tr>
                    <td valign="middle" align="right">
                        id:
                    </td>
                    <td valign="middle" align="left">
                        {{ emp.id }}
                        <input type="hidden" class="inputgri"  name="id" value="{{ emp.id }}"/>
                    </td>
                </tr>
                <tr>
                    <td valign="middle" align="right">
                        name:
                    </td>
                    <td valign="middle" align="left">
                        <input type="text" class="inputgri" name="name" value="{{ emp.name }}"/>
                    </td>
                </tr>
                <tr>
                    <td valign="middle" align="right">
                        salary:
                    </td>
                    <td valign="middle" align="left">
                        <input type="text" class="inputgri" name="salary" value="{{ emp.salary }}"/>
                    </td>
                </tr>
                <tr>
                    <td valign="middle" align="right">
                        age:
                    </td>
                    <td valign="middle" align="left">
                        <input type="text" class="inputgri" name="age" value="{{ emp.age}}"/>
                    </td>
                </tr>
                <tr>
                    <td valign="middle" align="right">
                        gender:
                    </td>
                    <td valign="middle" align="left">
                        {% if emp.gender%}
                             <input type="radio" class="inputgri" name="gender" value="1" checked/>男
                             <input type="radio" class="inputgri" name="gender" value="0"/>女
                        {% endif %}
                        {% if not emp.gender%}
                             <input type="radio" class="inputgri" name="gender" value="1"/>男
                             <input type="radio" class="inputgri" name="gender" value="0"  checked/>女
                        {% endif %}

                    </td>
                </tr>
                <tr>
                    <td valign="middle" align="right">
                        birth:
                    </td>
                    <td valign="middle" align="left">
                        <input type="text" class="inputgri" name="birth" value="{{ emp.birth|date:'Y-m-d' }}"/>
                    </td>
                </tr>

            </table>
            <p>
                <input type="submit" class="button" value="确认" />
            </p>
        </form>
    </div>
{% endblock %}
